package com.expense.util;

public class SqlConfig {
	private static PropertiesReader prop = PropertiesReader.getIntance("/db.properties");
	//sqlserver
	public static String MSQL_DB_DRIVER = prop.getProperty("driveName");
	public static String MSQL_DB_URL = prop.getProperty("connectURL");
	public static String MSQL_DB_USER = prop.getProperty("userName");
	public static String MSQL_DB_PASSWORD = prop.getProperty("password");
	
	/**数据库类型*/
	public static String MSQL_DB_Type=prop.getProperty("dbType");
	
	
	
	
	public static String SQL_SERVER="sqlserver";
	public static String ORACLE="oracle";
	public static String MYSQL="mysql";
	public static String ACCESS="access";
	
	
	public static boolean convetBoolean(String string){
		boolean ifalg=false;
		if(string!=null&&string.equals("true")){
			ifalg=true;
		}
		return ifalg; 
	}
	
	public static int convetInt(String string){
		int value=0;
		if(string!=null&&!string.equals("")){
			try {
				value=new Integer(string);
			} catch (Exception e) {
				// TODO: handle exception
			}
			
		}
		return value;
		
	}
	
}
